<%@include file="/common/CHeader.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>
<!doctype html>
<html>
<head>
    <title></title>
    <meta charset="UTF-8">
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <script>
        $(function () {
            $("#docid option").each(function () {
                var idvalue=$(this).val();
                if(idvalue==${olapXmlnode.docid}){
                    $(this).attr("selected",true);
                }
            })

        })
    </script>
</head>
<body>
<form action="updateXmlnode" method="post" class="definewidth m20">
    <input type="hidden" name="nodeid" value="${olapXmlnode.nodeid}" />
    <table class="table table-bordered table-hover definewidth m10">
        <tr>
            <td class="tableleft">文档ID</td>
            <td><select name="docid" id="docid" class="form-control">
                <c:forEach items="${olapXmldocList}" var="u">
                    <option value="${u.docid}">${u.docid}</option>
                </c:forEach>
            </select></td>
        </tr>
        <tr>
            <td class="tableleft">数据列ID</td>
            <td><select name="columnid" id="columnid" class="form-control">
                <c:forEach items="${olapColumnList}" var="b">
                    <option value="${b.columnid}">${b.columnid}</option>
                </c:forEach>
            </select>
            </td>
        </tr>


        <tr>
            <td class="tableleft"></td>
            <td>
                <input type="submit" class="btn btn-primary" value="保存"></input>	&nbsp;&nbsp;
                <input type="button" class="btn btn-success" name="backid" id="backid" onclick="showlist()" value="返回列表"></input>
            </td>
        </tr>
    </table>
</form>
</body>
</html>
<script>
    $(function () {
        $("#columnid option").each(function () {
            var acvalue=$(this).val();
            if(acvalue==${olapXmlnode.columnid}){
                $(this).attr("selected",true);
            }
        });

    });
    function showlist() {
        window.location.href="<%=basePath%>olapxmlnode/selectlist?docid=${olapXmlnode.docid}"
    }
</script>
